import 'package:json2dart_safe/json2dart.dart';

class EngagementHotTagModel {
  List<Data>? data;
  String? domain;

  EngagementHotTagModel({
    this.data,
    this.domain,
  });

  Map<String, dynamic> toJson() {
    return Map<String, dynamic>()
      ..put('data', this.data?.map((v) => v.toJson()).toList())
      ..put('domain', this.domain);
  }

  EngagementHotTagModel.fromJson(Map<String, dynamic> json) {
    this.data = (json['data'] as List<dynamic>?)?.map((item) {
      return Data.fromJson(item);
    }).toList();
    this.domain = json['domain'];
  }

  static EngagementHotTagModel toBean(Map<String, dynamic> json) =>
      EngagementHotTagModel.fromJson(json);
}

class Data {
  int? tagId;
  String? tagName;

  Data({
    this.tagId,
    this.tagName,
  });

  Map<String, dynamic> toJson() {
    return <String, dynamic>{}
      ..put('tagId', this.tagId)
      ..put('tagName', this.tagName);
  }

  Data.fromJson(Map<String, dynamic> json) {
    this.tagId = json['tagId'];
    this.tagName = json.asString('tagName');
  }
}
